* Added flag "top" to list=usercontribs if the user is the last contributor to the...
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 9 Jul 2008 11:44:49 +0000 (11:44 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 9 Jul 2008 11:44:49 +0000 (11:44 +0000)
* Limited API section in RELEASE-NOTES to 80 chars

RELEASE-NOTES
includes/api/ApiQueryUserContributions.php

index d8f9b38..8e0e714 100644 (file)
@@ -460,7 +460,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Replaced $wgAPIUCUserPrefixMinLength by the more generic $wgAPIMaxDBRows
 * (bug 11719) Remove trailing blanks in YAML output.
 * (bug 13541) Added siprop=specialpagealiases to meta=siteinfo
-* Added fallback8bitEncoding and readonly fields to meta=siteinfo&siprop=general output
+* Added fallback8bitEncoding and readonly fields to 
+  meta=siteinfo&siprop=general output
 * (bug 13544) Added prop=revid to action=parse
 * (bug 13603) Added siprop=usergroups to meta=siteinfo
 * Cleaned up redirect resolution
@@ -471,7 +472,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 12136) Extend allowed characters in JSON callback to ][.'"_A-Za-z0-9
 * (bug 11673) Return error 'unknown_action' in specified format
 * (bug 13618) Added rcprop=redirect and rcshow=redirect to list=recentchanges
-* (bug 13544) Added oldid parameter to action=parse to allow for parsing of old revisions
+* (bug 13544) Added oldid parameter to action=parse to allow for parsing of old
+  revisions
 * (bug 13718) Return the proper continue parameter for cmsort=timestamp
 * action=login now returns the correct waiting time in the details property
 * (bug 13792) Broken titles are now silently skipped in search results.
@@ -487,7 +489,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14013) Added rcshow=patrolled to list=recentchanges
 * (bug 14028) Added language attribute to interwiki map in meta=siteinfo
 * (bug 14022) Added usprop=registration and auprop=blockinfo
-* (bug 14021) Removed titles= support from list=backlinks (has been obsolete for ages)
+* (bug 14021) Removed titles= support from list=backlinks (has been obsolete 
+  for ages)
 * (bug 13829) Expose parse tree via action=expandtemplates
 * (bug 13606) Allow deletion of images
 * Added iiprop=mime and aiprop=metadata
@@ -508,13 +511,16 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added bkip parameter to list=blocks
 * (bug 14651) apprefix and similar parameters are now canonicalized
 * Added clprop=timestamp to prop=categories
-* (bug 14678) API errors now respects $wgShowExceptionDetails and $wgShowSQLErrors
+* (bug 14678) API errors now respects $wgShowExceptionDetails and 
+  $wgShowSQLErrors
 * (bug 14723) Added time zone and writing direction to meta=siteinfo
 * Added APIQueryInfoTokens and APIQueryRevisionsTokens hooks so extensions
   can add their own tokens
 * Added block and unblock tokens to prop=info as well
 * Added paging (limit and continue parameters) to
   prop={links,templatelinks,langlinks,extlinks,categories,images}
+* Added flag "top" to list=usercontribs if the user is the last contributor to
+  the page
 
 === Languages updated in 1.13 ===
 
index 4ee6360..966a047 100644 (file)
@@ -169,7 +169,8 @@ class ApiQueryContributions extends ApiQueryBase {
                        ));
 
                $this->addFieldsIf('rev_page', $this->fld_ids);
-               $this->addFieldsIf('rev_id', $this->fld_ids);
+               $this->addFieldsIf('rev_id', $this->fld_ids || $this->fld_flags);
+               $this->addFieldsIf('page_latest', $this->fld_flags);
                // $this->addFieldsIf('rev_text_id', $this->fld_ids); // Should this field be exposed?
                $this->addFieldsIf('rev_comment', $this->fld_comment);
                $this->addFieldsIf('rev_minor_edit', $this->fld_flags);
@@ -202,6 +203,8 @@ class ApiQueryContributions extends ApiQueryBase {
                                $vals['new'] = '';
                        if ($row->rev_minor_edit)
                                $vals['minor'] = '';
+                       if ($row->page_latest == $row->rev_id)
+                               $vals['top'] = '';
                }
 
                if ($this->fld_comment && !empty ($row->rev_comment))